"use strict";
(function () {
    // 还有三个修饰符 都是加在属性的前面的
    // public 公共的
    // protected 受保护的
    // private 私有的
    class PeopleClass {
        constructor(name, age, id) {
            this.id = id;
            this.name = name;
            this.age = age;
        }
        say() {
            console.log(this.name + "会说话");
        }
    }
    PeopleClass.desc = "人类是高等动物要敬畏自然而不是征服自然";
    class Women extends PeopleClass {
        constructor(name, age, id, hair) {
            super(name, age, id);
            //super 在这里就是执行父类的构造函数
            this.hair = hair;
        }
        run() {
            // console.log(this.name + "rurnunr")
            //报错 因为name是peopleclass私有的 只能在PeopleClass中使用
        }
    }
    let xiaolii = new PeopleClass("小丽", 18, 1);
    let anqila = new Women("安其拉", 18, 2, "长头发");
    xiaolii.say();
    // console.log(anqila.name);
})();
